package com.itheima.dubbo.web;

import com.itheima.dubbo.UserService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("user")
public class Controller {
    @DubboReference(check = false,timeout = 500,version = "1.0.1")
    private UserService service;

    @GetMapping("name")
    public String getName(String username){

        return service.getName(username);
    }
}
